#include "adc.h"

void ADC::Convert()
{
    for (uint8_t i = 0; i < ChanelNum; i++)
    {
        convertVoltage[i] = (float)rawData[i] * 3.3f / 4096.0f;
    }
}

float ADC::getVoltage(uint8_t _channel)
{
    if (_channel > ChanelNum)
        return 0;
    else
        return convertVoltage[_channel];
}
